package com.copera.cn.kaka.util;

import java.util.ArrayList;
import java.util.List;
import android.app.Activity;

public class ActivityManager {
	private static ActivityManager instance;
	private static List<Activity> activitys = new ArrayList<Activity>();
	
	private ActivityManager(){
	}
	
	public static ActivityManager getInstance(){
		if(instance == null){
			instance = new ActivityManager();
		}
		return instance;
	}
	
	
	public void push(Activity activity){
		activitys.add(activity);
	}
	
	public void exit(){
		for(Activity activity:activitys){
			activity.finish();
		}
		System.exit(0);
	}
	
}
